<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<c:import url="/view/admin/include/header/adminHeader.jsp"></c:import>
    <!-- 컨텐츠 부분 -->
	<div id="container">
    	<!-- 왼쪽 메뉴 부분 -->
    	<c:import url="/view/admin/include/left/adminLeft.jsp"></c:import>
        <!-- 왼쪽 메뉴 부분 -->
        <!-- 오른쪽 내용 부분 -->
        <dl>
        	<dd class="path">
        		홈 > 기타정보 관리 > <span class="path_b">접근통제IP</span>
        	</dd>
        </dl>
        <dl class="board_top">
            <dd>※ 본 시스템에 접근을 허락하는 IP 대역을 추가/삭제 하실 수 있습니다.</dd>
        </dl>	           
        <dl class="content">          
            <dd class="">
            	<table cellspacing="0" cellpadding="0" summary="" >
                	<caption></caption>
                    	 <colgroup>
							<col width="10%;"/>
							<col width="50%;"/>
							<col width="30%;"/>
							<col width="20%;"/>
                         </colgroup>
                    <thead>
                    	<tr>
	                       	<th scope="col" class="table_th_bottom">번호</th>
	                       	<th scope="col" class="table_th_bottom">IP주소</th>
	                        <th scope="col" class="table_th_bottom">사용처</th>
	                        <th scope="col" class="table_th_bottom">비고</th>
                        </tr>
                    </thead>
                    <tbody>
                    	<s:if test="%{1 > list.size()}">
                    	<tr>
                    		<td colspan="4">게시물이 없습니다.</td>
                    	<tr>
                    	</s:if>
                    	<s:iterator value="list" status="i">
						<tr>
							<td><s:property value="etcInfoBean.totalCount - #i.count+1" /></td>
							<td>${ip_address }</td>
							<td>${office_name }</td>
							<td><a href="/admin/deleteAcl.hcom?ip_seq=${ip_seq }" >삭제</a></td>
						</tr>
						</s:iterator>
                    </tbody>
                 </table>
            </dd>
        </dl>
        <dl><dd>&nbsp;</dd></dl>
        <dl class="content">  <br/><br/><br/>	
            <dd class="">
            	<form id="ipFrm" name="ipFrm" action="/admin/regAcl.hcom" method="post">
            	<table cellspacing="0" cellpadding="0" summary="" width="150" >
                	<caption></caption>
                    	 <colgroup>
                          <col width="15%;"/>
                          <col width="35%;"/>
                          <col width="15%;"/>
                          <col width="35%;"/>
                         </colgroup>
                    <tbody>
                    	<tr>
                        	<th scope="row" class="table_txt_left">IP주소</th>
                            <td class="table_txt_left"><input type="text" name="ip_address" id="ip_address" style="width:200px;" /></td>
                        	<th scope="row" class="table_txt_left">사용처</th>
                            <td class="table_txt_left"><input type="text" name="office_name" id="office_name" style="width:200px;"/></td>
                        </tr>                    
                    </tbody>
                 </table>
            	</form>
            </dd>
            <dd class="btn_right"><input type="button" value="쓰기" class="input_btn_s b" id="btn_reg" /></dd>
         </dl>
        <!-- 오른쪽 내용 부분 -->
    </div>
    <!-- 컨텐츠 부분 -->   
<c:import url="/view/admin/include/footer/adminFooter.jsp"></c:import>
<script type="text/javascript">
	$().ready(function(){
	
	$("#btn_reg").click(function(){
		if(confirm("추가하시겠습니까?")){
			$("#ipFrm").submit();
		}
	});
	});
</script>
